package com.ygl.log;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

import java.util.List;
import java.util.Map;

/**
 * @Date 2022/1/30 16:56
 * @Created yanggld
 * @Description
 */
public class Test {
    public static void main(String[] args) throws JsonProcessingException {
        String a = "{\"user\":12}";
        Map<String, Integer> map = ParamUtil.getMap(a);

        String b ="{ \"knowledge_base_info\": [{\"base_no\": \"123\",\"base_name\": \"baseName123\" }]}";

        Map<Integer, List<KnoBaseModel>> paramMap = ParamUtil.<Integer,KnoBaseModel>str2Map2(b);
        for (Map.Entry<Integer, List<KnoBaseModel>> entry : paramMap.entrySet()) {
            System.out.println(entry.getKey());
            System.out.println(entry.getValue());
        }

//        List<KnoBaseModel> knowledgeReqBizParam = ParamUtil.getKnowledgeReqBizParam(b, "knowledge_base_info");
//        for (KnoBaseModel knoBaseModel : knowledgeReqBizParam) {
//            System.out.println(knoBaseModel);
//        }
    }
}
